package com.probiz.estoresa.system.web.action;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.validation.BindException;

import com.probiz.estore.common.model.system.AppAudit;
import com.probiz.estore.core.controller.GenericStoreAdminController;
import com.probiz.estore.system.service.AppAuditManager;

public class AppAuditController extends GenericStoreAdminController<AppAudit> {
    private AppAuditManager appAuditManager = null;
    
    public void setAppAuditManager(AppAuditManager appAuditManager) {
        this.appAuditManager = appAuditManager;
    }
    
	@Override
	protected String getEntityName(AppAudit entity) {
		return entity.getActionName();
	}

	@Override
	protected void initController() throws Exception {
		this.mgr = appAuditManager;
		
	}
	
	@Override
	protected Map<String,String> getSortMap(){
		Map<String,String> sortMap = new HashMap<String,String>();
		sortMap.put("1", "convert_gbk(procUsername)");
		sortMap.put("2", "actionName");
		sortMap.put("3", "procResult*-1");
		sortMap.put("4", "remoteIpInfo");
		sortMap.put("5", "procTime");
		return sortMap;
	}


	@Override
	protected void preSave(HttpServletRequest request, AppAudit entity, BindException errors) {
		
	}

}
